import axios from '../utils/request'
// 用户列表
export const userList = (data) =>
{
    return axios({
        method: 'post',
        url: '/userList/read',
        data
    })
}
// 查找全部用户
export const userListAll = (data) =>
{
    return axios({
        method: 'post',
        url: '/userList/readAll',
        data
    })
}
// 创建用户
export const userCreate = (data) =>
{
    return axios({
        method: 'post',
        url: '/usertype/create',
        data
    })
}
// 编辑用户
export const userUpdate = (data) =>
{
    return axios({
        method: 'post',
        url: '/userList/update',
        data
    })
}
// 删除用户
export const userDelete = (data) =>
{
    return axios({
        method: 'post',
        url: '/userList/delete',
        data
    })
}
// 根据用户查询权限
export const userAndUserType = (data) =>
{
    return axios({
        method: 'post',
        url: '/userList/findByName',
        data
    })
}
// 搜索框获取所有的用户名
// 根据用户查询权限
export const findAllName = (data) =>
{
    return axios({
        method: 'post',
        url: '/userList/findAllName',
        data
    })
}
export const findByDepartmentID = (data) =>
{
    return axios({
        method: 'post',
        url: '/userList/findByDepartmentID',
        data
    })
}
// 根据用户ID查询用户
export const findUserById = (data) =>
{
    return axios({
        method: 'post',
        url: '/userList/findUserById',
        data
    })
}
